package clazz.ATM;

public class Account {
    private String name;
    private char sex;
    private String password;
    private double money;
    private double limit;
    private String idcar;

    public double getLimit() {
        return limit;
    }

    public void setLimit(double limit) {
        this.limit = limit;
    }

    public double getMoney() {
        return money;
    }

    public void setMoney(double money) {
        this.money = money;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public char getSex() {
        return sex;
    }

    public void setSex(char sex) {
        this.sex = sex;
    }

    public String getName() {
        return name+(sex=='男' ?"先生":"女士");
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getIdcar() {
        return idcar;
    }

    public void setIdcar(String idcar) {
        this.idcar = idcar;
    }

    public Account(String name, char sex, String password, double money, double limit, String idcar) {
        this.name = name;//名字
        this.sex = sex;//性别
        this.password = password;//密码
        this.money = money;//余额
        this.limit = limit;//体现额度
        this.idcar = idcar;//卡号
    }

    public Account() {
    }
}
